package com.itlong.cloud.equip.property;

import com.itlong.cloud.POJO.DTO.property.DeviceMediaInfoGetPageDTO;
import com.itlong.cloud.POJO.DTO.property.DeviceMediaInfoSaveDTO;
import com.itlong.cloud.POJO.DTO.property.DeviceMediaInfoUpdateDTO;
import com.itlong.cloud.POJO.DTO.property.DeviceMediaSetEnableDTO;
import com.itlong.cloud.POJO.VO.property.DeviceMediaInfoGetVO;
import com.itlong.cloud.POJO.VO.property.DeviceMediaInfoVO;
import com.itlong.cloud.utils.page.Page;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * <desc>
 *   设备多媒体信息服务接口协议提供对象.
 * </desc>
 *
 * @createDate 2017-10-23
 */
@FeignClient(name = "equip-service")
public interface IDeviceMediaInfoServiceClient {

    /**
     * <desc>
     *     一键启用/禁用设备多媒体信息【根据多媒体Id列表】
     * </desc>
     * @param deviceMediaSetEnableDTO  一键启用/禁用多媒体信息参数对象
     * @return 受影响的行数
     * @author Lix
     * @createDate 2017-10-20
     */
    @RequestMapping(path = "property/deviceMediaInfo/setMediaInfoEnable",method = {RequestMethod.POST})
    Integer setMediaInfoEnable(@RequestBody DeviceMediaSetEnableDTO deviceMediaSetEnableDTO) throws Exception;


    /**
     * <desc>
     *      分页查询设备多媒体信息
     * </desc>
     *
     * @param deviceMediaInfoGetPageDTO 分页查询设备多媒体信息数据传输对象
     * @return 分页查询结果对象
     * @author Lix
     * @createDate 2017-10-20
     */
    @RequestMapping(path = "property/deviceMediaInfo/getPage",method = {RequestMethod.POST})
    Page<DeviceMediaInfoVO> getMediaInfoByPage(@RequestBody DeviceMediaInfoGetPageDTO deviceMediaInfoGetPageDTO) throws Exception;

    /**
     * <desc>
     *     保存单个多媒体资源
     * </desc>
     *
     * @param deviceMediaInfoSaveDTO 保存多媒体资源数据传输对象
     * @return 受影响的行数
     * @throws Exception
     * @author wangzhi
     * @createDate 2018-3-27
     */
    @PostMapping(path = "property/deviceMediaInfo/saveDeviceMediaInfo")
    Integer saveDeviceMediaInfo(@RequestBody DeviceMediaInfoSaveDTO deviceMediaInfoSaveDTO) throws Exception;

    /**
     * <desc>
     *     获取单个设备多媒体信息
     * </desc>
     *
     * @param mediaId 多媒体id
     * @return 单个设备多媒体信息结果对象
     * @author wangzhi
     * @createDate 2018-03-28
     */
    @PostMapping(path = "property/deviceMediaInfo/getOneMediaInfo")
    DeviceMediaInfoGetVO getOneMediaInfo(@RequestParam("mediaId")String mediaId);

    /**
     * <desc>
     *     修改单个多媒体资源
     * </desc>
     *
     * @param deviceMediaInfoUpdateDTO 修改多媒体资源数据传输对象
     * @return 受影响的行数
     * @throws Exception
     * @author wangzhi
     * @createDate 2018-3-28
     */
    @PostMapping(path = "property/deviceMediaInfo/updateDeviceMediaInfo")
    Integer updateDeviceMediaInfo(@RequestBody DeviceMediaInfoUpdateDTO deviceMediaInfoUpdateDTO) throws Exception;

    /**
     * <desc>
     *     发布多媒体资源，支持批量
     * </desc>
     *
     * @param mediaIds 多媒体资源id字符串
     * @return 影响的行数
     * @author wangzhi
     * @createDate 2018-04-09
     */
    @PostMapping(path = "property/deviceMediaInfo/publishMedias")
    Integer publishMedias(@RequestParam("mediaIds") String mediaIds) throws Exception;

    /**
     * <desc>
     *     修改已过期多媒体资源的发布状态
     * </desc>
     *
     * @param
     * @return 是否修改成功
     * @author wangzhi
     * @createDate 2018-04-10
     */
    @RequestMapping(path = "property/deviceMediaInfo/checkAndChangeOverMediaPublishStatusTask")
    boolean checkAndChangeOverMediaPublishStatusTask() throws Exception;

    /**
     * <desc>
     *     兼容旧多媒体数据接口
     * </desc>
     *
     * @return
     * @author wangzhi
     * @createDate 2018-04-19
     */
    @PostMapping(path = "property/deviceMediaInfo/compatibilityOldMediaData")
    Integer compatibilityOldMediaData() throws Exception;

    /**
     * <desc>
     *     修复本人因失误造成的错误数据
     * </desc>
     *
     * @return
     * @author wangzhi
     * @createDate 2018-04-20
     */
    @PostMapping(path = "property/deviceMediaInfo/repairWrongData")
    Integer repairWrongData() throws Exception;

    /**
     * <desc>
     *      设备广告审核通过
     * </desc>
     *
     * @param deviceMediaSetEnableDTO 设备广告参数DTO
     * @return
     * @Author Zhu.yj
     * @createDate  2020/12/25
     */
    @PostMapping("/operate/marketer/deviceMedia/audit")
    Integer audit(@RequestBody DeviceMediaSetEnableDTO deviceMediaSetEnableDTO) throws Exception;

}
